﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HRMSystemShi.Model
{
    public class LoginUserInfo
    {
        public string? RealName { get; private set; }
        public bool IsAdmin { get; private set; }
        public string? UserName { get; private set; }

        public static LoginUserInfo? loginUserInfo = null;
        private LoginUserInfo() { }

        public static LoginUserInfo GetInstance()
        {
            if (loginUserInfo == null)
            {
                loginUserInfo = new LoginUserInfo();
            }
            return loginUserInfo;

        }

        public void InitMember(string? realName,string? userName, bool isAdmin)
        {
            RealName = realName;
            UserName = userName;
            IsAdmin = isAdmin;
        }
    }
}
